﻿<%@ Page Language="C#" enableEventValidation="false" Title="Current Test" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="JustTest.Test" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <div class="hero-unit">
        <header class="custom-header">
            <h1><%: currentTest.Title %></h1>
            <br />
            <p><strong>Description: </strong><%: currentTest.Description %></p>
        </header>
    </div>
    <div class="row-fluid">
        <div class="span12">
            <asp:GridView ID="GridViewQuestions" runat="server" 
                ItemType="JustTest.Models.Question" 
                SelectMethod="RepeaterQuestions_GetData" 
                AutoGenerateColumns="false"
                CssClass="table table-hover table-striped">
                <Columns>
                    <asp:DynamicField DataField="Content" />
                    <asp:TemplateField HeaderText="Answers">
                <ItemTemplate>
                    <asp:RadioButtonList ID="RadioButtonListAnswers" runat="server" DataSource="<%# Item.Answers %>" DataTextField="Content" DataValueField="Value"/>
                </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>

            <asp:Button ID="ButtonSubmitTest" CssClass="btn btn-success btn-large" Width="300px" style="float:right" Text="Submit Test" runat="server" OnClick="ButtonSubmitTest_Click"/>

            <div class="hero-unit">
                <asp:Literal ID="LiteralTestResult" runat="server" Text="You have " Visible="false"></asp:Literal>

            </div>
        </div>
    </div>
</asp:Content>

